<?php
use dmstr\widgets\Menu;
echo Menu::widget(
            [
                'options' => ['class' => 'sidebar-menu'],
                'items' => [
                    ['label' => 'Menu', 'options' => ['class' => 'header']],
                    [
                        'label' => Yii::t('app', '订单管理'),
                        'url' => ['/orders/index'],
                        'icon' => 'fa fa-tasks',
                        'active' => 'orders' === Yii::$app->controller->id,
                        'visible' => \Yii::$app->user->can('orders/index'),
                    ],
                    [
                        'label' => Yii::t('app', '发票管理'),
                        'url' => ['/invoice/index'],
                        'icon' => 'fa fa-sliders',
                        'active' => 'invoice' === Yii::$app->controller->id,
                        'visible' => \Yii::$app->user->can('invoice/index'),
                    ],
                ],
            ]
        )

?>